#ifndef HOUSECREATEWIDGET_H
#define HOUSECREATEWIDGET_H

#include <QWidget>
#include "../MyTcp2/tcpsession.h"

class MainWidget;

namespace Ui {
class HouseCreateWidget;
}

class HouseCreateWidget : public QWidget
{
    Q_OBJECT

public:
    explicit HouseCreateWidget(TcpSession* session,MainWidget* mainWidget, QWidget *parent = nullptr);

    void show(QString & username, QString & nickname);
private slots:
    void on_pushButton_create_clicked();

    void on_pushButton_cancel_clicked();

    void on_slider_limit_valueChanged(int value);

    void on_house_add_signal(bool res, const QString & msg="");
    void on_logout_call_signal(const QString& msg);

private:
    Ui::HouseCreateWidget *ui;
    //
    MainWidget* mainWidget;
    TcpSession* session=nullptr;
    QString username;
    QString nickname;
};

#endif // HOUSECREATEWIDGET_H
